//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_park_player.sqf"
#include "xr_macros.sqf"

private "_dosleep";
PARAMS_1(_dosleep);
__TRACE_1("park_player","_dosleep");
__pSetVar [QGVARXR(isdead), true];
GVARXR(phd_invulnerable) = true;
if (_dosleep) then {
	_etime = time + __pGetVar(GVARXR(presptime)) - 1.3;
	__TRACE_1("killedeh spawn","_etime");
	waitUntil {time >= _etime};
	__TRACE("park_player, black out");
	172 cutText [(localize "STR_DOM_MISSIONSTRING_931"),"BLACK OUT", 1];
	waitUntil {alive player};
};
player setPos (markerPos QGVARXR(playerparkmarker));
[QGVARXR(hpl), player] call d_fnc_NetCallEvent;
[false] spawn FUNCXR(spectating);
__TRACE("park_player, black in");
172 cutText [(localize "STR_DOM_MISSIONSTRING_931"),"BLACK IN", 1];